<?php $this->load->view('config/header');?>
<h2>Form <?php echo $mode?></h2>
<div class="line-separtor"></div>
<br/>	
	<a href="<?php echo site_url()?>multicontent" class="btn btn-primary"> Kembali ke daftar </a>
<br/>
<br/>
<form method="post" action="<?php echo site_url() ?>multicontent/<?php echo $action; ?>" class="form-horizontal">
	<input type="hidden" name="id_multi_content" value="<?php echo @$detail[0]['id_multi_content']?>">
	<input type="hidden" name="date_multi_content" value="<?php echo @$detail[0]['date_multi_content']?>">
	
	<div class="control-group">
		<label class="control-label" for="id_menu">Menu</label>
		<div class="controls">
			<select name="id_menu">
				<option value="">Pilih menu</option>
				
				<?php if (@$menucontent):?>
					<?php foreach ($menucontent as $row):?>
						<?php if ($row['id_menu'] == @$detail[0]['id_menu']):?>
							<?php $selected =  'selected="selected"' ?>
						<?php else :?>
							<?php $selected =  '' ?>
						<?php endif;?>
						<option value="<?php echo $row['id_menu'] ?>" <?php echo $selected ?> ><?php echo $row['nama_menu'] ?></option>
					<?php endforeach?>
				<?php endif?>
			</select>
		</div>
	</div>
	
	<div class="control-group">
		<label class="control-label" for="title_multi_content">Title Content</label>
		<div class="controls">
		  <input type="text" class="span5" name="title_multi_content" value="<?php echo @$detail[0]['title_multi_content']?>" >
		</div>
	</div>
	
	<div class="control-group">
		<label class="control-label" for="enable">Enable</label>
		<div class="controls" style="padding-top:5px">
			<?php 
				if(@$detail[0]['enable'] == 1){
					$check = "checked";
				}else{
					if($action == "save"){
						$check = "checked";
					}else{
						$check = "";
					}
				}
			?>
			<input type="checkbox" name="enable" value="1" <?php echo $check; ?> ></input>
		</div>
	</div>
	<div class="form-actions">
		<input type="submit" name="submit" value="Simpan" class="btn btn-primary"/>
		<a href="<?php echo site_url()?>multicontent" class="btn">Batal</a>
	</div>
</form>
<?php $this->load->view('config/footer');?>